﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LibUpdate
{
    /// <remarks>文件类型</remarks>
    public enum FileType
    {
        /// <summary>
        /// 可执行文件
        /// </summary>
        EXE = 1,
        /// <summary>
        /// 动态库
        /// </summary>
        DLL = 2,
        /// <summary>
        /// 地图文件
        /// </summary>
        SHP = 3,
        /// <summary>
        /// xml
        /// </summary>
        XML = 4,
        /// <summary>
        /// 一切文本文件（不包括xml）
        /// </summary>
        TXT = 5,
        /// <summary>
        /// 图片
        /// </summary>
        Image = 6,
        /// <summary>
        /// VBSript脚本
        /// </summary>
        VBS = 7,
        /// <summary>
        /// bat批处理
        /// </summary>
        BAT = 8,
        /// <summary>
        /// 目录
        /// </summary>
        Directory = 9,
        /// <summary>
        /// 数据库执行脚本
        /// </summary>
        SQL = 10,
        /// <summary>
        /// 数据库文件
        /// </summary>
        MDB = 11,
        /// <summary>
        /// 升级配置文件
        /// </summary>
        UpdateInfoFile = 12,
    }

    /// <remarks>更新执行动作</remarks>
    public enum ActionType
    {
        /// <summary>
        /// 添加
        /// </summary>
        Add = 1,
        /// <summary>
        /// 删除
        /// </summary>
        Delete = 2,
        /// <summary>
        /// 更新
        /// </summary>
        Update = 3,
        /// <summary>
        /// 修改
        /// </summary>
        Edit = 4,
        /// <summary>
        /// 执行
        /// </summary>
        ExeC = 5
    }

    public enum ActionObjType
    {
        /// <summary>
        /// 文件
        /// </summary>
        File = 1,
        /// <summary>
        /// 目录
        /// </summary>
        Directory = 2
    }

    /// <summary>
    /// 是否类型
    /// </summary>
    public enum LJType
    {
        Yes = 1,
        No = 0
    }

    /// <summary>
    /// 文件下载状态
    /// </summary>
    public enum FileDownState
    {
        /// <summary>
        /// 打开链接
        /// </summary>
        Open = 1,
        /// <summary>
        /// 正在下载
        /// </summary>
        Down = 2,
        /// <summary>
        /// 下载完成
        /// </summary>
        End = 3,
        /// <summary>
        /// 下载错误
        /// </summary>
        Error = 4,
        /// <summary>
        /// 排队中，等候下载
        /// </summary>
        Queuer = 5,
        /// <summary>
        /// 重试下载中
        /// </summary>
        Again = 6
    }

    /// <summary>
    /// 文件更新状态
    /// </summary>
    public enum FileActionState
    {
        /// <summary>
        /// 正在更新
        /// </summary>
        Begin = 1,
        /// <summary>
        /// 更新完成
        /// </summary>
        End = 2,
        /// <summary>
        /// 更新错误
        /// </summary>
        Error = 3,
        /// <summary>
        /// 排队中，等候下载
        /// </summary>
        Queuer = 4
    }

    /// <summary>
    /// 更新目标，主程序、数据库、升级程序本身
    /// </summary>
    public enum UpdateGoal
    {
        /// <summary>
        /// 主程序
        /// </summary>
        MainPro,
        /// <summary>
        /// 升级系统本身
        /// </summary>
        UpdatePro,
        /// <summary>
        /// 数据库
        /// </summary>
        MDB
    }

    /// <summary>
    /// 下载驱动模式
    /// </summary>
    public enum DownProviderType
    {
        /// <summary>
        /// http下载
        /// </summary>
        Http = 1,
        /// <summary>
        /// ftp下载
        /// </summary>
        Ftp = 2,
        /// <summary>
        /// tcp自定义协议下载
        /// </summary>
        Tcp = 3,
        /// <summary>
        /// mail下载
        /// </summary>
        Mail = 4
    }


    /// <summary>
    /// 版本状态
    /// </summary>
    public enum VersionDownState
    {
        /// <summary>
        /// 版本更新开始
        /// </summary>
        BegionVersionUpdate,
        /// <summary>
        /// 开始下载
        /// </summary>
        BegionDown,
        /// <summary>
        /// 结束下载
        /// </summary>
          EndDown,
        /// <summary>
        /// 更新文件
        /// </summary>
         BegionUpdate,
        /// <summary>
        /// 更新完成
        /// </summary>
          EndUpdate,
        /// <summary>
        /// 完成版本更新
        /// </summary>
        EndVersionUpdate,
        /// <summary>
        ///更新失败
        /// </summary>
        Err
    }
}
